From EP 0 795 686 B1, a device is known for detecting misfiring of an electronically controlled diesel engine. The diesel engine includes a crankshaft, a combustion chamber, an injection nozzle for injecting fuel into the combustion chamber and an injection pump. The injection pump is driven by the crankshaft and used to pressurize the fuel and supply the fuel to a nozzle. The diesel engine ignites the fuel to rotate and drive the crankshaft. The unit includes a device for detecting the rotational speed of the crankshaft and a device for controlling the injection pump in order to set the quantity of fuel to be injected by the injection nozzle into the combustion chamber. The control device controls the injection pump so that the quantity of fuel to be supplied by the injection pump to the injection nozzle reduces in accordance with an increase in the rotary speed detected by the detection device. Furthermore, the unit has a first calculation device for calculating a rate of change of the rotational speeds at predetermined rotation-phase positions of the crankshaft on the basis of the rotational speed detected by the detection device. Furthermore, the unit includes a device for determining an occurrence of misfiring in the diesel engine on the basis of a comparison of the rate of change calculated by the first calculation device with a predetermined reference value. A second calculation unit for calculating a change in the quantity of fuel to be injected by the injection nozzle and a device for correcting the reference value used for determining the misfire on the basis of the change in the quantity of the fuel calculated by the second calculation device is provided.